<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
   
    <title>用户管理</title>
	<link href="${pageContext.request.contextPath }/css/admin/common.css" type="text/css" rel="stylesheet">
	<style type="text/css">
		table{
			text-align: center;
			border-collapse: collapse
		}
		.bgcolor{
		  	background-color: #F08080;
		}
	</style>
	<style type="text/css">
	table{
		border-color:green;
		margin-left:20px;
		margin-top:20px;
		width:600px;
	}
	table tr td{
		padding:10px 5px;
		font-size: 12px;	
	}
	table tr:nth-child(odd){
		background-color: #eee;
	}
	table tr td input[type=submit],table tr td input[type=reset]{width:137px;height:35px; background:url(images/btnbg.png) no-repeat; font-size:14px;font-weight:bold;color:#fff; cursor:pointer;}
	table tr td input[type=text]{width:345px; height:25px; line-height:25px; border-top:solid 1px #a7b5bc; border-left:solid 1px #a7b5bc; border-right:solid 1px #ced9df; border-bottom:solid 1px #ced9df;text-indent:10px;}
	select{width:105px; height:25px; line-height:25px; border-top:solid 1px #a7b5bc; border-left:solid 1px #a7b5bc; border-right:solid 1px #ced9df; border-bottom:solid 1px #ced9df;text-indent:10px;}
	table tr td:first-child{padding-left:23px;line-height:25px; font-weight: bold;text-align: center;}
	table tr th{height:50px;}
	form{margin-left:20px;margin-top:20px;}
	input[type=submit]{width:60px;margin-left:20px;}
</style>
	
	
	<script type="text/javascript">
	var tempName="";
		function changeColor(obj){
			tempName=obj.style.backgroundColor;
			//obj.className = "bgcolor";
			obj.style.backgroundColor="#F08080";
		}
		function changeColor1(obj){
			obj.style.backgroundColor=tempName;
		}
		function checkDel(id){
  			if(window.confirm("是否删除该用户？")){
  				window.location.href="${pageContext.request.contextPath }/adminUser/deleteuserManager?id="+id;
  			}
  		}
	</script>
</head>
<body>
	<br>
	<table border="1" bordercolor="PaleGreen">
		<tr>
			<th width="200px">用户ID</th>
			<th width="200px">用户E-mail</th>
			<th width="250px">删除</th>
		</tr>
		<c:forEach var="n" items="${userList}">
		<tr onmouseover="changeColor(this)" onmouseout="changeColor1(this)">
			<td>${n.id}</td>
			<td>${n.email}</td>
			<td>
				<a href="javaScript:checkDel('${n.id}')">删除</a>
			</td>
		</tr>
		</c:forEach>
		<tr>
			<td colspan="4">${msg }</td>
		</tr>
	</table>
</body>
</html>